# -*- coding: UTF-8 -*-
# Author: Damon(wuud1)
# CreateDate: 
# Message:
# from lxml import etree
#
# file = '/Users/duanmengdi/Desktop/workspace/py3_code/dpac/dapcHtml/t20190118_81581.html'
# with open(file, 'r') as f:
#     res = f.read()
#
# doc = etree.HTML(res)
# tail_tr_list = doc.xpath('//div[@class="table"]/table/tbody/tr')
# loop_tr = tail_tr_list[4:-9]
# make = tail_tr_list[0].xpath('./td[2]/text()')[0].strip() # 生厂商
# print(make)
# date = tail_tr_list[1].xpath('./td[2]/text()')[0].strip().replace("-", "").replace("至", "-")
# print(date)
# count = tail_tr_list[2].xpath('./td[2]/text()')[0].strip().replace("辆", "")
# print(count)
# info_l = []
# for tr in loop_tr:
#     model = tr.xpath('./td[1]/text()')[0].strip()
#     name = tr.xpath('./td[2]/text()')[0].strip()
#     years = tr.xpath('./td[3]/text()')[0].strip()
#     qty = tr.xpath('./td[4]/text()')[0].strip()
#     time_start_end = tr.xpath('./td[5]//text()')
#     time_s = time_start_end[0].replace("起：", "").strip().replace("-", "")
#     time_e = time_start_end[1].replace("止：", "").strip(' \n').replace("-", "")
#     vin_start_end = tr.xpath('./td[6]//text()')
#     vin_s = vin_start_end[0].replace("起：", "").strip()
#     vin_e = vin_start_end[1].replace("止：", "").strip(' \n')
#     _dict = {
#         "model": model,
#         "name": name,
#         "years": years,
#         "qty": qty,
#         "time_s": time_s,
#         "time_e": time_e,
#         "vin_s": vin_s,
#         "vin_e": vin_e,
#     }
#     info_l.append(_dict)
# A = tail_tr_list[-9].xpath('./td[2]/text()')[0].strip()
# print(A)
# B = tail_tr_list[-8].xpath('./td[2]/text()')[0].strip()
# print(B)
# C = tail_tr_list[-7].xpath('./td[2]/text()')[0].strip()
# print(C)
# D = tail_tr_list[-6].xpath('./td[2]/text()')[0].strip()
# print(D)
# E = tail_tr_list[-5].xpath('./td[2]/text()')[0].strip()
# print(E)
# F = tail_tr_list[-4].xpath('./td[2]/text()')[0].strip()
# print(F)
# G = tail_tr_list[-3].xpath('./td[2]/text()')[0].strip()
# print(G)
# H = tail_tr_list[-2].xpath('./td[2]/text()')[0].strip()
# print(H)
# I = tail_tr_list[-1].xpath('./td[2]/text()')[0].strip()
# print(I)
# other = {
#     "A": A,
#     "B": B,
#     "C": C,
#     "D": D,
#     "E": E,
#     "F": F,
#     "G": G,
#     "H": H,
#     "I": I,
# }
# _fina = {
#     "make": make,
#     "date": date,
#     "count": count,
#     "info": info_l,
#     "other": other,
# }
# print(_fina)


# s = ['http://wap.dpac.gov.cn/qczh/qczhgg1/201804/t20180404_75870.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201711/t20171115_72856.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201709/t20170925_72010.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201709/t20170918_71904.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201709/t20170901_71535.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201703/t20170331_68650.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201703/t20170324_68496.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201606/t20160616_62108.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201605/t20160527_61689.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201604/t20160429_61163.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201512/t20151218_59105.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201511/t20151130_58649.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201508/t20150807_56997.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201505/t20150508_55329.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201503/t20150312_51451.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201503/t20150309_48962.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201503/t20150306_48020.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201502/t20150216_48013.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201502/t20150216_48012.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201502/t20150216_48011.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201502/t20150213_48010.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201502/t20150213_48009.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201502/t20150213_48008.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201502/t20150213_48007.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201502/t20150213_48006.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201502/t20150206_47790.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201502/t20150206_47789.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201501/t20150129_47788.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201501/t20150129_47787.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201501/t20150123_47786.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201501/t20150123_47785.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201501/t20150123_47784.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201501/t20150123_47783.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201501/t20150123_47782.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201501/t20150123_47780.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201501/t20150122_47779.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201501/t20150121_47781.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201501/t20150116_47778.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201501/t20150116_47777.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201501/t20150113_47776.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201501/t20150108_46708.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141231_46662.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141231_46661.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141231_46660.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141231_46659.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141231_46658.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141231_46657.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141231_46656.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141226_46268.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141226_46267.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141226_46266.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141219_46264.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141217_45323.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141217_45322.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141217_45321.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141217_45320.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141216_45318.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141216_45317.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141216_45316.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141216_45319.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141216_48888.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141216_48895.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141205_45265.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141204_45264.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141203_45247.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201412/t20141202_45244.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201411/t20141128_45262.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201411/t20141128_45242.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201411/t20141128_45241.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201411/t20141117_44638.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201411/t20141117_44637.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201411/t20141117_44636.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201411/t20141117_44639.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201411/t20141115_44635.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201411/t20141115_44634.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201411/t20141115_44633.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201411/t20141114_44632.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201411/t20141114_44631.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201411/t20141106_44630.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201410/t20141029_44629.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201410/t20141027_44628.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201410/t20141024_44627.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201410/t20141024_44626.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201410/t20141017_44625.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201410/t20141015_44624.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201410/t20141014_44622.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201410/t20141014_44623.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201410/t20141013_44621.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201410/t20141011_44620.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201410/t20141011_44619.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140930_44617.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140930_44618.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140930_44616.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140926_44614.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140926_44615.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140919_44613.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140919_44612.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140919_44611.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140919_44610.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140911_44609.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140911_44608.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140911_44607.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140909_44605.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140905_44606.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140904_44604.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201409/t20140901_44603.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140829_44602.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140829_44601.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140829_44600.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140829_44598.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140829_44599.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140828_44597.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140825_44596.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140822_44595.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140820_44594.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140820_44593.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140815_44592.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140815_44591.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140815_44590.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140808_44589.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201408/t20140805_44588.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201407/t20140731_44587.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201407/t20140730_44586.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201407/t20140728_44585.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201407/t20140725_44584.html', 'http://wap.dpac.gov.cn/qczh/qczhgg1/201407/t20140725_44583.html']
# for i in s:
#     print(i)


_set = ['SC7169KC5.C32A', 'SC7169KC5.C42A', 'SC7169KC5.C31A', 'SC7169KC5.C41A', 'SC7169KC5.C4', 'SC7169KC5.C3', 'SC7169KC5.C2', 'SC7169KCA5.C4G1', 'SC7169KCA5.C3G1', 'SC7169KBH5.C4', 'SC7169KDH5.C4', 'SC7169KCH5.C5', 'SC7169KCH5.C51A', 'SC7169KA5.C3', 'SC7169KA5.C4', 'SC7169KA5.C2', 'SC7169KA5.C21A', 'SC7169KA5.C32A', 'SC7169KA5.C41A', 'SC7169KA5.C42A', 'SC7169KA5.C31A', 'SC7169KCAH5.C5G1', 'SC7169KAH5.C51A', 'SC7169KAH5.C5', 'SC6469GA5HEV.S92A', 'SC6469GA5HEV.S82A', 'SC6469GA5HEV.S72A', 'SC6469GA5HEV.S62A', 'SC6469GA5HEV.S52A', 'SC6469GA5HEV.S32A', 'SC6469GA5HEV.S42A', 'SC6469GA5HEV.S22A', 'SC6469GA5HEV.SA2A', 'SC7164GDA5.S5', 'SC7164GDA5.S4', 'SC7164GDA5.S3', 'SC7164GDA5.S2', 'SC7164GCB5.S2', 'SC7164GCB5.S3', 'SC7164GCB5.S4', 'SC7164GCB5.S5', 'SC7164GDB5.S2', 'SC7164GDB5.S4', 'SC7164GDB5.S3', 'SC7164GDB5.S5', 'SC7164GCA5.S3', 'SC7164GCA5.S4', 'SC7164GCA5.S2', 'SC7164GCA5.S5', 'SC7155AAA5.S21B', 'SC7155AAA5.S21D', 'SC7155AAA5.S21E', 'SC7155AAA5.S21DS1', 'SC7155AAA5.S1', 'SC7155AAA5.S2', 'SC7155AAA5.S11B', 'SC7155AAA5.S11D', 'SC7155AAA5.S11E', 'SC7155AAA5.S1S1', 'SC7155AAH5.S41B', 'SC7155AAH5.S31B', 'SC7155AAH5.S3', 'SC7155AAH5.S4', 'SC7155AA6.S11D-L', 'SC7155AA6.S21D-L', 'SC7155AA6.S1-L', 'SC7155AA6.S2-L', 'SC7155AABH5.S31D', 'SC7155AABH5.S31E', 'SC7155AABH5.S31B', 'SC7155AABH5.S31ES1', 'SC7155AABH5.S31BS1', 'SC7155AABH5.S41E', 'SC7155AABH5.S31DS1', 'SC7155AABH5.S41D', 'SC7155AABH5.S41B', 'SC7155AABH5.S4', 'SC7155AABH5.S3', 'SC7155ABH5.S31B', 'SC7155ABH5.S2', 'SC7155ABH5.S3', 'SC7155ABH5.S4', 'SC7155ABH5.S21B', 'SC7155ABH5.S41B', 'SC7155AA5.S2S1', 'SC7155AA5.S1', 'SC7155AA5.S2', 'SC7155AA5.S11B', 'SC7155AA5.S1S1', 'SC7155AA5.S21B', 'SC7155ABBH5.S1S1', 'SC7155ABBH5.S3', 'SC7155ABBH5.S21B', 'SC7155ABBH5.S21D', 'SC7155ABBH5.S21E', 'SC7155ABBH5.S4', 'SC7155ABBH5.S41A', 'SC7155ABBH5.S1', 'SC7155ABBH5.S2', 'SC7155ABBH5.S41D', 'SC7155ABBH5.S41E', 'SC7155ABBH5.S41B', 'SC7155ABBH5.S41C', 'SC7155ABBH5.S42E', 'SC7155ABBH5.S42D', 'SC7155ABBH5.S31B', 'SC7155ABBH5.S31E', 'SC7155ABBH5.S43D', 'SC7155ABBH5.S31D', 'SC7155ABBH5.S43E', 'SC7155ABBH5.S2S1', 'SC7155ABBH5.S31BS1', 'SC7155ABBH5.S11D', 'SC7155ABBH5.S3S1', 'SC7155ADH5.S31A', 'SC7155ADH5.S3', 'SC7155ABH6.S2-L', 'SC7155ABH6.S41D-L', 'SC7155ABH6.S11D-L', 'SC7155ABH6.S42D-L', 'SC7155ABH6.S21D-L', 'SC7155ABH6.S1-L', 'SC7155ABH6.S44D-L', 'SC7155ABH6.S43D-L', 'SC7155ABH6.S3-L', 'SC7155ABH6.S41A-L', 'SC7155ABH6.S31D-L', 'SC7155ABH6.S4-L', 'SC7155AAH6.S3-L', 'SC7155AAH6.S31D-L', 'SC7155AAH6.S41D-L', 'SC7155AAH6.S4-L', 'SC7168FA5.B13A', 'SC7168FA5.B22A', 'SC7168FA5.B12A', 'SC7168FA5.B32A', 'SC7168FBA5.B22A', 'SC7168FBA5.B42A', 'SC7168FBA5.B32A', 'SC7168FAH5.B42A', 'SC7108BAH5.B42A', 'SC7108BAH5.B22A', 'SC7168FB5.B42A', 'SC7168FB5.B32A', 'SC7168FB5.B22A', 'SC7168FAA5.B13A', 'SC7168FAA5.B12A', 'SC7168FAA5.B22A', 'SC7168FAA5.B32A', 'SC7168FAAH5.B42A', 'SC7168FBA6.B2-L', 'SC7108BAAH5.B22A', 'SC7108BAAH5.B42A', 'SC7144BA5.B41A', 'SC7144BA5.B31A', 'SC7144BA5.B21A', 'SC7144BA5.B3', 'SC7144BA5.B2', 'SC7144BA5.B4', 'SC7152AA5.B31A', 'SC7152AA5.B21A', 'SC7152AA5.B3', 'SC7152AA5.B2', 'SC7152AAH5.B41A', 'SC7152AAH5.B4', 'SC7169MBH5.C52A', 'SC7169MA5.C31A', 'SC7169MA5.C42A', 'SC7169MA5.C41A', 'SC7169MA5.C22A', 'SC7169MA5.C21A', 'SC7169MA5.C32A', 'SC7169MB5.C41A', 'SC7169MB5.C22A', 'SC7169MB5.C21A', 'SC7169MB5.C32A', 'SC7169MB5.C31A', 'SC7169MB5.C42A']
print(len(_set))




